package com.hzqy.web.ac;


import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONObject;
import com.hzqy.commons.service.HotelAllianceService;



@Controller
@RequestMapping("/")
public class GetPriceHotel {
	protected final Logger LOG = LoggerFactory.getLogger(getClass());
	//private JSONObject jsonObject = null ;

	@RequestMapping("/getPriceDate")
	@ResponseBody
	public Object getPriceDate(String serverid,String timestamp,String secret,String source,HttpServletRequest request,HttpServletResponse response){
		HotelAllianceService hotelAllianceService = new HotelAllianceService(request,response);
		int readTimeOut = 3000 ;
		int connectTimeout = 3000;
		String Result = hotelAllianceService.getPrice(serverid, timestamp, secret, source, readTimeOut, connectTimeout);
		JSONObject jsonObject = JSONObject.parseObject(Result);
		return jsonObject;
	}
}
